import SwiftUI

import SwiftUI

struct AnimatableAttributes_Text : View {
    @State var isChange = false
    
    var body: some View {
        VStack(spacing: 30) {
            Text("Animatable Attributes")
                .font(.largeTitle)
            
            Text("Text size")
                .font(.title)
                .foregroundColor(.gray)
            
            Text("...")
                .font(.title3)
                .padding()
                .frame(maxWidth: .infinity)
                .background(
                    Color.indigo
                )
            
            makeDemoView()
            
            Spacer()
            
            Button(action: {
                isChange.toggle()
            }, label: {
                Text("Change")
            })
            .padding(.bottom, 50)
            .font(.title)
        }
    }
    
    func makeDemoView() -> some View {
        Text("Hello!")
            .font(.system(size: 60.0))
            .scaleEffect(isChange ? 1 : 0.3)
            .animation(.easeInOut, value: isChange)
//            .border(.yellow, width: 2)
    }
}
